package com.github.zhengchalei.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * springboot app
 *
 * @author stone
 * @date 2022/02/20
 */
@RestController
@SpringBootApplication
public class SpringbootDockerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootDockerApplication.class, args);
    }

    @GetMapping("/")
    public String hello(@RequestParam(required = false, defaultValue = "docker") String name) {
        return "hello " + name;
    }
}
